package com.copa.module.system.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.copa.domain.PageVo;
import com.copa.domain.ResponseDto;
import com.copa.module.system.domain.dto.TradeDto;
import com.copa.module.system.domain.entity.AdminLogEntity;
import com.copa.module.system.domain.entity.TradeEntity;
import com.copa.module.system.domain.vo.TradeVo;
import com.copa.module.system.service.TradeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author copa
 * @createDate 2021-02-26 13:50
 * @function
 */
@RestController
@Api(tags = {"主页图表查看接口"})
public class TradeController {

    @Autowired
    private TradeService tradeService;

    @ApiOperation(value = "主页图表数据")
    @PostMapping("/trade/chart")
    public ResponseDto<List<TradeDto>> chart(@RequestBody TradeVo tradeVo) {
        return tradeService.chart(tradeVo);
    }
}
